home *** CD-ROM | disk | FTP | other *** search
- #include "bbs.h"
-
- int Bulletins(void)
- {
- int stat,stat2,bflag2;
- char str[81];
- BPTR fh;
-
- gnsflag=0;
- bflag2=0;
-
- strcpy(str,Screen_Location);
- strcat(str,"Bulletins/BullHelp.txt");
- if(!(fh=Open(str,MODE_OLDFILE))) {
- MyError(12); // AEPutStr("\r\nNo bulletins are available in this conference!\r\n\r\n");
- return(SUCCESS);
- }
- Close(fh);
-
- stat2=CommandSplit();
- if(stat2>1) {
- sscanf(Command[1],"%d",&stat);
- if(stat2==3) gnsflag=CheckForNS(Command[2]);
- } else {
- HelpAgain:
- bflag2=1;
- strcpy(GSTR1,Screen_Location);
- strcat(GSTR1,"Bulletins/BullHelp");
- ChecktoDisplay(GSTR1,GSTR3,0,0);
- InputAgain:
- sprintf(str,"Which Bulletin (?)=List, (Enter)=none? ");
- AEPutStr(str);
- stat2=LineInput("",str,8,KEYBOARD_TIMEOUT);
- if(stat2<0) return(stat2);
- if(str[0]=='\0') {
- AEPutStr("\r\n");
- return(SUCCESS);
- }
- if(str[0]=='?') goto HelpAgain;
- gnsflag=CheckForNS(str);
- sscanf(str,"%d",&stat);
- }
-
- sprintf(GSTR1,"%sBulletins/Bull%d",Screen_Location,stat);
- if(!(stat2=ChecktoDisplay(GSTR1,GSTR3,0,1))) {
- sprintf(str,"\r\nSorry there is no bulletin #%d\r\n\r\n",stat);
- AEPutStr(str);
- }
- if(bflag2) goto InputAgain;
- return(SUCCESS);
- }
-
-